#!/usr/bin/python2.7
from os import walk, chdir, getcwd
from sys import argv
from re import match

class walker:

  def process(self, path):
    res = walk(path)
    return res

if __name__ == "__main__":
  instance = walker()
  argument = argv[1]
  walk_tuple = instance.process(argument)
  counter = 0
  if walk_tuple == -1:
    print "Error: Wrong path format. correct format is '/this/is/path/to_directory/'"
  else:
    for (root, directory, files) in walk_tuple:
      print '****\n\n\n'
      print "level ", counter, " content", '\n\n'
      print 'root = ', root
      print 'directory = ', directory
      print 'files = ', files
      counter += 1
